<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>5-on可以实现事件委托</title>
		<!-- 导入Jquery -->
		<script type="text/javascript" src="js/jquery2.1.4.min.js"></script>
	</head>
	<body>
		<ul>
			<li>百度</li>
			<li>新浪</li>
			<li>阿里</li>
		</ul>
		<script type="text/javascript">
			$(function(){
				//$('ul>li').click(function(){});
				//事件委托 ul 委托给li,让li触发点击事件
				$('ul').on('click','li',function(){
					alert(1);
				});
			});
		</script>
	</body>
</html>
